<template>
  <div>{{ count }}{{ show }} <button @click="addCount(10)">加</button></div>
</template>

<script>
import { mapState } from "vuex";
import { mapMutations } from "vuex";
export default {
  computed: {
    ...mapState(["count"]),
    show() {
      return 10;
    },
  },
  methods: {
    ...mapMutations(["addCount"]),
  },
};
</script>

<style lang="less" scoped>
</style>